package com.zzu.base.controller.hello;

import com.zzu.base.common.pojo.ResultResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
@Tag(name = "你好世界")
@PreAuthorize("hasPermission(null,'restricted_use')")
public class HelloController {

    @GetMapping("hello")
    @Operation(method = "你好",description = "happy the world")
    public ResultResponse<String> hello() {
        return ResultResponse.success("hello，world!!!");
    }
}
